' vbIRCd - Software/Code is an IRCd(Internet Relay Chat Daemon) used to host IRC sessions
' Copyright (C) 2001 Nathan Martin
'
' This program is free software; you can redistribute it and/or modify
' it under the terms of the GNU General Public License as published by
' the Free Software Foundation; either version 2 of the License, or
' (at your option) any later version.
'
' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU General Public License for more details.
'
' You should have received a copy of the GNU General Public License
' along with this program; if not, write to the Free Software
' Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'
' To Contact the author e-mail TRON at tron@ircd-net.org
' * Note: There is no post mail contact information due to that it can be abused...
'
'
'
Public Sub SYS(Text As String, Index As Integer)
On Error Resume Next
Dim X As Integer
Dim Z As Integer
Dim Y As Integer
Dim Q As Integer
Dim iX As Double
Dim TmpText As String
Dim TmpText2 As String
Dim TmpLoad As String
Dim TmpMsg As String
Dim TmpFlag As String
Dim TmpData As String
Dim DFY As Boolean
Dim DUI As Boolean ' Dead User Info
With frmMain
iPing(Index) = 0 ' Let's reset ping idle so we won't have to ping alive connections
sBReceived = sBReceived + Len(Text)
sTReceived = sTReceived + 1
Text = Text & " "
If Left$(LCase(Text), 2 + Len(iUser(Index))) = ":" & LCase(iUser(Index)) & " " Then Text = Mid$(Text, 2 + Len(iUser(Index)))
If Left$(Text, 1) = ":" Then Exit Sub
ReScan:
If Left$(Text, 1) = " " Then Text = Mid$(Text, 2): GoTo ReScan
If Left$(Text, 1) = Chr$(34) Then
Text = Mid$(Text, 2)
Text = Mid$(Text, 1, Len(Text) - 3)
Text = Text & " ": GoTo ReScan
End If
If Text = "" Then Exit Sub
If Not Left$(Text, 5) = "PONG " Then If iFC(Index) > iFloodCMDs Then KillUser Index, sServer, "Command Flooding": Exit Sub
If Not Left$(Text, 5) = "PONG " Then If Not iFloodCMDs = 0 And iUserLevel(Index) = 0 Then iFC(Index) = iFC(Index) + 1
If Not Left$(Text, 5) = "PONG " Then If Not iFloodCMDs = 0 And iFC(Index) = iFloodCMDs Then SendData Index, ":" & sServer & " NOTICE " & iUser(Index) & " :*** WARNING: DO NOT SEND ONE MORE COMMAND FOR ONE MINUTE OR ELSE YOU WILL BE DISCONNECTED FOR FLOODING!!!" & CRLF
If Not X = 0 Then SendData2 Q, ":" & sServer & " NOTICE " & iUser(Q) & " :*** NOTICE -- " & iUser(Index) & " (" & iName(Index) & "@" & iRHost(Index) & ") has connected to server on port " & .Win(Index).LocalPort & CRLF